<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" 
	xmlns:f="http://java.sun.com/jsf/core">
<h:head>
	<ui:include src="include/head.xhtml" />
</h:head>
<h:body>
	<ui:include src="include/header.xhtml" />
	<div class="main">
		<table width="100%">
			<tr>
				<td width="15%" valign="top">
					<ui:include src="include/menu.xhtml" />
				</td>
				<td class="main" valign="top">
					<h:form>
						<table width="100%">
						<tr>
							<td valign="top">
								Выберите факультет:
								<br />
								<h:dataTable value="#{enterTeacherBean.faculties.items}" var="f" binding="#{enterTeacherBean.faculties.dataTable}">
									<h:column>
										<a class="#{enterTeacherBean.faculties.style}" href="http://localhost:8080/university-web/enter/teacher/#{f.id}/">#{f.title}</a>
									</h:column>
								</h:dataTable>
							</td>
							<td valign="top">
								<h:panelGroup rendered="#{enterTeacherBean.departments.id != null}">
									Выберите свое имя в списке:
									<h:dataTable value="#{enterTeacherBean.teachers.items}" var="t" binding="#{enterTeacherBean.teachers.dataTable}">
										<h:column>
											<a class="#{enterTeacherBean.teachers.style}" href="http://localhost:8080/university-web/enter/teacher/#{enterTeacherBean.faculties.id}/#{enterTeacherBean.departments.id}/#{t.id}">#{t.name}</a>
										</h:column>
									</h:dataTable>
								</h:panelGroup>
							</td>
						</tr>
						<tr>
							<td valign="top">
							<h:panelGroup rendered="#{enterTeacherBean.faculties.id != null}">
									Выберите кафедру:
									<br />
									<h:dataTable value="#{enterTeacherBean.departments.items}" var="d"  binding="#{enterTeacherBean.departments.dataTable}">
										<h:column>
											<a class="#{enterTeacherBean.departments.style}" href="http://localhost:8080/university-web/enter/teacher/#{enterTeacherBean.faculties.id}/#{d.id}">#{d.title}</a>
										</h:column>
									</h:dataTable>
								</h:panelGroup>
							</td>
							<td valign="top">
								<h:panelGroup rendered="#{enterTeacherBean.teachers.id != null}">
									Введите пароль и нажмите войти: <br />
									<h:inputSecret value="#{enterTeacherBean.password}" /><br/>
									<h:commandButton action="#{enterTeacherBean.doLogin}" value="Войти"/>
								</h:panelGroup>
							</td>
						</tr>
						</table>
					</h:form>
					<h:messages />
					<br />
				</td>
			</tr>
		</table>
	</div>
</h:body>
</html>